﻿using System;
using System.Globalization;
using System.Linq;
using Kotonoha.Server.Plugins;

namespace Kotonoha.Server.UI.Converters {
    public class PluginStatusConverter : ValueConverterWithDesignerSupport {
        protected override object ConvertToCore(object value, Type type, object parameter, CultureInfo culture) {
            Plugin p = value as Plugin;
            if (p == null) {
                return "";
            }
            return p.GetMessage();
        }

        protected override object ConvertFromCore(object value, Type type, object parameter, CultureInfo culture) {
            throw new NotImplementedException();
        }
    }
}